
package com.yzp.controller;

import com.yzp.dao.UserMapper;
import com.yzp.entity.User;
import com.yzp.service.UserService;
import com.yzp.test1.dao.Test1UserMapper;
import com.yzp.test2.dao.Test2UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanzhouping
 */
@RestController
public class UserController {
	@Autowired
	private UserService userService;
	@Autowired
	private UserMapper userMapper;
    @Autowired
    private Test1UserMapper test1UserMapper;
    @Autowired
    private Test2UserMapper test2UserMapper;

	@RequestMapping("/createUser")
	public String createUser(String name, Integer age) {
        User user = new User();
        user.setName(name);
        user.setAge(age);
        userService.createUser(user);
		return "success";
	}
}
